﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.CodeDom.Compiler;
using LEET.Application.Compilers.CSharp;

namespace Tedds_Tool.Compilers.CSharp
{
    public class CsCompilerError : ICsCompilerError
    {
        private CompilerError err;

        public CsCompilerError(CompilerError err)
        {
            this.err = err;
        }

        public int Line { get { return err.Line; } }
        public string Message { get { return err.ErrorText; } }
        public string ErrorNumber { get { return err.ErrorNumber; } }
        public bool IsWarning { get { return err.IsWarning; } }

        public override string ToString()
        {
            return "Error(" + ErrorNumber + "): " + Message + " on Line " + Line;
        }
    }
}
